
'use strict';

angular.module('myApp.tuition_refer', [])

.controller('tuition_referCtrl', ['$scope','$http',

    function($scope,$http) {
    $http.get('v1/student').success(function(data){
        $scope.model = data.message['data'];
         console.log($scope.model);
    });    


    $('#search_send_button').on('click',function(){      

    	var result = {'id' : $scope.n}; 
        $http.post('v1/tuition/account',result).success(function(data){
  	        if(!data.error ){
        		$scope.refers = data.message['data'];	
        		console.log($scope.refer);
	        }else{
	            alert(data.message);
	        }
	    });	
    });
	
}]);